package com.handydata.antifraud.common.exception;

import com.handydata.common.exception.ExCode;

/**
 * 报警规则定义表异常码枚举类
 * 
 * @author guolong
 * @email jishu@handy-data.cn
 * @date 2019-08-18 20:57:31
 */
public enum RiskRuleDictInfoExCode implements ExCode{

	SUCCESS("0000", "成功"),
	ERROR("1111", "数据已存在"),

	BIZ_SYS_ID_CANT_BE_NULL(E.BIZ_EX_PREFIX + "000001", "系统编号不能为空"),
	BIZ_SYS_SEQ_CANT_BE_NULL(E.BIZ_EX_PREFIX + "000002", "请求序列号不能为空"),
	//BIZ_...

	SYS_CREATE_ENTITY_ERROR(E.SYS_EX_PREFIX + "1000", "新增记录错误"),
	SYS_NO_ENTITY_CREATED(E.SYS_EX_PREFIX + "1001", "没有记录被新增"),
	SYS_MODIFY_ENTITY_ERROR(E.SYS_EX_PREFIX + "1002", "修改记录错误"),
	SYS_NO_ENTITY_MODIFIED(E.SYS_EX_PREFIX + "1003", "没有记录被修改"),
	SYS_QUERY_ENTITY_ERROR(E.SYS_EX_PREFIX + "1004", "查询规则配置字典表为空"),
	SYS_QUERY_NETWORK_ERROR(E.SYS_EX_PREFIX + "1004", "查询网络异常"),
	SYS_DELETE_ENTITY_ERROR(E.SYS_EX_PREFIX + "1005", "删除记录错误"),
	SYS_NO_ENTITY_DELETED(E.SYS_EX_PREFIX + "1006", "没有记录被删除"),
	SYS_LOAD_RULETO_REDIS(E.SYS_EX_PREFIX + "1007", "加载规则到redis出错"),

	SYS_LOAD_RULETO_PROCESSNAME(E.BIZ_EX_PREFIX + "1111", "规则决策名称入参为空"),
	SYS_LOAD_RULETO_PRODUCTCODE(E.BIZ_EX_PREFIX + "1111", "规则产品号入参为空"),
	SYS_LOAD_RULETO_STATUSCODE(E.BIZ_EX_PREFIX + "1111", "目前系统中支持状态码为：0-3范围,请做修改"),
	SYS_LOAD_RULETO_CUSTTYPECODE(E.BIZ_EX_PREFIX + "1111", "规则包名称入参为空"),
	SYS_LOAD_RULETO_STATUS(E.BIZ_EX_PREFIX + "1111", "状态码入参为空"),
	SYS_LOAD_RULETO_STATUS_FOMAT(E.BIZ_EX_PREFIX + "1111", "状态码入参格式有误"),
	SYS_LOAD_RULETO_SCENARIO(E.BIZ_EX_PREFIX + "1111", "授信续约区别码入参为空"),
	SYS_LOAD_RULETO_SCENARIO_FOMAT(E.BIZ_EX_PREFIX + "1111", "授信续约区别码入参格式有误"),

	SYS_UNKNOWN_ERROR(E.SYS_EX_PREFIX + "9999", "未知系统异常")
	;

    public String errorCode;
    public String errorMsg;

    private static class E {
    	public static final String SYS_EX_PREFIX = "RISK_ALARM_RULE_DEF_SYS_";
    	public static final String BIZ_EX_PREFIX = "RISK_ALARM_RULE_DEF_BIZ_";
    }

    private RiskRuleDictInfoExCode(String errorCode, String errorMsg){
        this.errorCode = errorCode;
        this.errorMsg = errorMsg;
    }

	@Override
	public String getErrorCode() {
		return this.errorCode;
	}

	@Override
	public String getErrorMsg() {
		return this.errorMsg;
	}
}
